﻿namespace GameLogicLibrary

    module Utilities = 

        open System
        open Microsoft.Xna.Framework
        open Microsoft.Xna.Framework.Graphics

        type Random
          with
            member this.NextFloat with get() = this.NextDouble() |> float32

        let random = new Random()

        let lerp (a:float32) (x:float32<'u>) (y:float32<'u>) = x * a + y * (1.0f - a)

        let random_lerp : float32<'u> -> float32<'u> -> float32<'u> = fun x y -> lerp (random.NextFloat) x y

